<?php
include '../system/system.php';
if(isset($_COOKIE["username"])){
    $token=authcode($_COOKIE["username"],'DECODE','codecj80808');
    $k=explode("##",$token);
    if($k[0]!=$home["username"] || $k[1]!=$home["password"]){
        exit("<script>alert('非法访问！');location.href='login.php';</script>");
    }
}else{
    exit("<script>alert('非法访问!');location.href='login.php';</script>");
}
$protocol =((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')) ? 'https://' : 'http://';
$url=$protocol.$_SERVER['HTTP_HOST'].substr($PHP_SELF,0,strrpos($PHP_SELF,'/')+1);

?>